]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Minor refactor
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 26 Jan 2024 19:29:33 +0000 (20:29 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 29 Feb 2024 15:34:21 +0000 (16:34 +0100)
This small function is just called from a single place,
drop it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>

js/ui/keyboard.js

index 16adf91d3a2ef4d0abcc8ef120df18db2b88f5de..a172eb80372cb5c845504c40d039141e6ea9d583 100644 (file)
@@ -1440,11 +1440,6 @@ export const Keyboard = GObject.registerClass({
         this._layers = layers;
     }
 
-    _ensureKeys() {
-        const group = this._keyboardController.getCurrentGroup();
-        this._updateLayout(group, this._purpose);
-    }
-
     _addRowKeys(keys, layout, emojiVisible) {
         let accumulatedWidth = 0;
         for (let i = 0; i < keys.length; ++i) {
@@ -1746,7 +1741,8 @@ export const Keyboard = GObject.registerClass({
     }
 
     _updateKeys() {
-        this._ensureKeys();
+        const group = this._keyboardController.getCurrentGroup();
+        this._updateLayout(group, this._purpose);
         this._setActiveLevel('default');
     }